<?php

namespace Admin\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Articles
 *
 * @ORM\Table(name="articles", indexes={@ORM\Index(name="IDX_BFDD3168D7077436", columns={"lng_id"}), @ORM\Index(name="IDX_BFDD3168C69D3FB", columns={"usr_id"}), @ORM\Index(name="IDX_BFDD316828D797FE", columns={"artc_parent_id"}), @ORM\Index(name="IDX_BFDD3168A5BA57E2", columns={"rs_id"})})
 * @ORM\Entity
 */
class Articles
{
    /**
     * @var integer
     *
     * @ORM\Column(name="artc_id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $artcId;

    /**
     * @var string
     *
     * @ORM\Column(name="artc_title", type="string", length=100, nullable=false)
     */
    private $artcTitle;

    /**
     * @var string
     *
     * @ORM\Column(name="artc_slug", type="string", length=100, nullable=false)
     */
    private $artcSlug;

    /**
     * @var string
     *
     * @ORM\Column(name="artc_introtext", type="text", nullable=true)
     */
    private $artcIntrotext;

    /**
     * @var string
     *
     * @ORM\Column(name="artc_fulltext", type="text", nullable=true)
     */
    private $artcFulltext;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="artc_created", type="datetime", nullable=true)
     */
    private $artcCreated;

    /**
     * @var \Admin\Entity\Articles
     *
     * @ORM\ManyToOne(targetEntity="Admin\Entity\Articles")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="artc_parent_id", referencedColumnName="artc_id")
     * })
     */
    private $artcParent;

    /**
     * @var \Admin\Entity\Resources
     *
     * @ORM\ManyToOne(targetEntity="Admin\Entity\Resources")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="rs_id", referencedColumnName="rs_id")
     * })
     */
    private $rs;

    /**
     * @var \Admin\Entity\Users
     *
     * @ORM\ManyToOne(targetEntity="Admin\Entity\Users")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="usr_id", referencedColumnName="usr_id")
     * })
     */
    private $usr;

    /**
     * @var \Admin\Entity\Languages
     *
     * @ORM\ManyToOne(targetEntity="Admin\Entity\Languages")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="lng_id", referencedColumnName="lng_id")
     * })
     */
    private $lng;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\ManyToMany(targetEntity="Admin\Entity\Categories", inversedBy="artc")
     * @ORM\JoinTable(name="articles_categories",
     *   joinColumns={
     *     @ORM\JoinColumn(name="artc_id", referencedColumnName="artc_id")
     *   },
     *   inverseJoinColumns={
     *     @ORM\JoinColumn(name="ctgr_id", referencedColumnName="ctgr_id")
     *   }
     * )
     */
    private $ctgr;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->ctgr = new \Doctrine\Common\Collections\ArrayCollection();
    }


    /**
     * Get artcId
     *
     * @return integer 
     */
    public function getArtcId()
    {
        return $this->artcId;
    }

    /**
     * Set artcTitle
     *
     * @param string $artcTitle
     * @return Articles
     */
    public function setArtcTitle($artcTitle)
    {
        $this->artcTitle = $artcTitle;

        return $this;
    }

    /**
     * Get artcTitle
     *
     * @return string 
     */
    public function getArtcTitle()
    {
        return $this->artcTitle;
    }

    /**
     * Set artcSlug
     *
     * @param string $artcSlug
     * @return Articles
     */
    public function setArtcSlug($artcSlug)
    {
        $this->artcSlug = $artcSlug;

        return $this;
    }

    /**
     * Get artcSlug
     *
     * @return string 
     */
    public function getArtcSlug()
    {
        return $this->artcSlug;
    }

    /**
     * Set artcIntrotext
     *
     * @param string $artcIntrotext
     * @return Articles
     */
    public function setArtcIntrotext($artcIntrotext)
    {
        $this->artcIntrotext = $artcIntrotext;

        return $this;
    }

    /**
     * Get artcIntrotext
     *
     * @return string 
     */
    public function getArtcIntrotext()
    {
        return $this->artcIntrotext;
    }

    /**
     * Set artcFulltext
     *
     * @param string $artcFulltext
     * @return Articles
     */
    public function setArtcFulltext($artcFulltext)
    {
        $this->artcFulltext = $artcFulltext;

        return $this;
    }

    /**
     * Get artcFulltext
     *
     * @return string 
     */
    public function getArtcFulltext()
    {
        return $this->artcFulltext;
    }

    /**
     * Set artcCreated
     *
     * @param \DateTime $artcCreated
     * @return Articles
     */
    public function setArtcCreated($artcCreated)
    {
        $this->artcCreated = $artcCreated;

        return $this;
    }

    /**
     * Get artcCreated
     *
     * @return \DateTime 
     */
    public function getArtcCreated()
    {
        return $this->artcCreated;
    }

    /**
     * Set artcParent
     *
     * @param \Admin\Entity\Articles $artcParent
     * @return Articles
     */
    public function setArtcParent(\Admin\Entity\Articles $artcParent = null)
    {
        $this->artcParent = $artcParent;

        return $this;
    }

    /**
     * Get artcParent
     *
     * @return \Admin\Entity\Articles 
     */
    public function getArtcParent()
    {
        return $this->artcParent;
    }

    /**
     * Set rs
     *
     * @param \Admin\Entity\Resources $rs
     * @return Articles
     */
    public function setRs(\Admin\Entity\Resources $rs = null)
    {
        $this->rs = $rs;

        return $this;
    }

    /**
     * Get rs
     *
     * @return \Admin\Entity\Resources 
     */
    public function getRs()
    {
        return $this->rs;
    }

    /**
     * Set usr
     *
     * @param \Admin\Entity\Users $usr
     * @return Articles
     */
    public function setUsr(\Admin\Entity\Users $usr = null)
    {
        $this->usr = $usr;

        return $this;
    }

    /**
     * Get usr
     *
     * @return \Admin\Entity\Users 
     */
    public function getUsr()
    {
        return $this->usr;
    }

    /**
     * Set lng
     *
     * @param \Admin\Entity\Languages $lng
     * @return Articles
     */
    public function setLng(\Admin\Entity\Languages $lng = null)
    {
        $this->lng = $lng;

        return $this;
    }

    /**
     * Get lng
     *
     * @return \Admin\Entity\Languages 
     */
    public function getLng()
    {
        return $this->lng;
    }

    /**
     * Add ctgr
     *
     * @param \Admin\Entity\Categories $ctgr
     * @return Articles
     */
    public function addCtgr(\Admin\Entity\Categories $ctgr)
    {
        $this->ctgr[] = $ctgr;

        return $this;
    }

    /**
     * Remove ctgr
     *
     * @param \Admin\Entity\Categories $ctgr
     */
    public function removeCtgr(\Admin\Entity\Categories $ctgr)
    {
        $this->ctgr->removeElement($ctgr);
    }

    /**
     * Get ctgr
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getCtgr()
    {
        return $this->ctgr;
    }
}
